<template>
	<view class='tabbox'>
	<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="text" activeColor="#8cc540"></uni-segmented-control>
	        <view class="contents">
	            <view v-show="current === 0">
	                <Dv></Dv>
	            </view>
	            <view v-show="current === 1">
	                <Dv></Dv>
	            </view>
	           <view v-show="current === 2">
	               <Dv></Dv>
	           </view>
	        </view>
		</view>
</template>

<script setup>
	import {uniSegmetndControl} from '../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue'
	import Dv from '@/pages/order/dv.vue'
	import {ref} from 'vue'
	const items=ref(['全部', '自取','外卖'])
	const current=ref(0)
	const onClickItem =(e)=> {
	      if (current.value != e.currentIndex) {
	              current.value = e.currentIndex;
	            }
	    }
</script>

<style scoped>
	 .tabbox .contents{
		width:350px;
			display: flex;
			justify-content: center;
			align-items: center;
			text-align: center;
	}
		.tabbox .content-text {
			font-size: 14px;
			color: #666;
		}
		.tabbox .segmented-control.data-v-064e9cd1{
			padding:0 50px;
			width:350px;
			display: flex;
			box-sizing: border-box;
			flex-direction: row;
			height: 36px;
			overflow: hidden;
		} 
</style>